package chp03;

import java.util.Scanner;

public class Test10 {

    public static void main(String[] args) {
        //字符串比较内容相等
        Scanner input = new Scanner(System.in);
        System.out.println("请输入admin:");
        String name = input.next();
        System.out.print("name == \"admin\":");
        System.out.println(name == "admin");
        System.out.print("name.equals(\"admin\"):");
        System.out.println(name.equals("admin"));
    }
}
